html,
body,
#app {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === 通用工具类 === */

/* 布局 */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-xs {
    gap: var(--spacing-xs);
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

/* 间距 */
.m-0 {
    margin: 0;
}

.m-xs {
    margin: var(--spacing-xs);
}

.m-sm {
    margin: var(--spacing-sm);
}

.m-md {
    margin: var(--spacing-md);
}

.m-lg {
    margin: var(--spacing-lg);
}

.p-0 {
    padding: 0;
}

.p-xs {
    padding: var(--spacing-xs);
}

.p-sm {
    padding: var(--spacing-sm);
}

.p-md {
    padding: var(--spacing-md);
}

.p-lg {
    padding: var(--spacing-lg);
}

/* 文本 */
.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-normal {
    font-weight: var(--font-weight-normal);
}

.text-medium {
    font-weight: var(--font-weight-medium);
}

.text-semibold {
    font-weight: var(--font-weight-semibold);
}

.text-bold {
    font-weight: var(--font-weight-bold);
}

.text-primary {
    color: var(--color-text);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-tertiary {
    color: var(--color-text-tertiary);
}

/* 背景 */
.bg-primary {
    background-color: var(--color-background);
}

.bg-secondary {
    background-color: var(--color-background-secondary);
}

.bg-tertiary {
    background-color: var(--color-background-tertiary);
}

/* 边框 */
.border {
    border: 1px solid var(--color-border);
}

.border-secondary {
    border: 1px solid var(--color-border-secondary);
}

.rounded-xs {
    border-radius: var(--radius-xs);
}

.rounded-sm {
    border-radius: var(--radius-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

/* 阴影 */
.shadow {
    box-shadow: var(--shadow-default);
}

.shadow-hover {
    box-shadow: var(--shadow-hover);
}

/* 过渡 */
.transition-fast {
    transition: all var(--transition-fast);
}

.transition-normal {
    transition: all var(--transition-normal);
}

.transition-slow {
    transition: all var(--transition-slow);
}

.pointer {
    cursor: pointer;
}

/* === 滚动条样式 === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar-thumb);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-scrollbar-thumb-hover);
}

/* === 交互状态 === */
.ripple {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--color-background-tertiary);
    border-radius: 100%;
    transform: scale(0);
    opacity: 1;
    pointer-events: none;
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.hover {
    position: absolute;
    background: radial-gradient(
            circle,
            var(--color-background-tertiary) 0%,
            rgba(211, 211, 211, 0.1) 80%
    );
    border-radius: 100%;
    opacity: 1;
    pointer-events: none;
}

.top-text-span {
    margin: 0;
    padding: 0;

    position: absolute;
    z-index: 2;

}

/* === 响应式断点 === */
@media (min-width: var(--breakpoint-sm)) {
    .sm\:flex {
        display: flex;
    }
}

@media (min-width: var(--breakpoint-md)) {
    .md\:flex {
        display: flex;
    }
}

@media (min-width: var(--breakpoint-lg)) {
    .lg\:flex {
        display: flex;
    }
}
